unit Spring.XE.Attribute;

interface

uses Winapi.Windows, System.Classes;

type

  TBeanAttribute = class(TCustomAttribute)
  strict private
    FBeanName: string;
    FLazyInit: Boolean;
    FScope: string;
    FInitMethod: string;
    FInterceptor: string;
    FLifycycle: string;
  public
    constructor Create(ABeanName: string; ALazyInit: Boolean; AScope, AInitMethod, AInterceptor, ALifycycle: string);

    property BeanName: string read FBeanName write FBeanName;
    property LazyInit: Boolean read FLazyInit write FLazyInit;
    property Scope: string read FScope write FScope;
    property InitMethod: string read FInitMethod write FInitMethod;
    property Interceptor: string read FInterceptor write FInterceptor;
    property Lifycycle: string read FLifycycle write FLifycycle;
  end;

  TPropertyAttribute = class(TCustomAttribute)
  strict private
    FValue: string;
    FRefrence: string;
  public
    constructor Create(AValue, ARefrence: string);

    property Value: string read FValue write FValue;
    property Refrence: string read FRefrence write FRefrence;
  end;

  TConstructorArgAttribute = class(TCustomAttribute)
  strict private
    FIndex: Integer;
    FValue: string;
    FRefrence: string;
  public
    constructor Create(AIndex: Integer; AValue, ARefrence: string);

    property Index: Integer read FIndex write FIndex;
    property Value: string read FValue write FValue;
    property Refrence: string read FRefrence write FRefrence;
  end;



implementation

{ TBeanAttribute }

constructor TBeanAttribute.Create(ABeanName: string; ALazyInit: Boolean; AScope, AInitMethod, AInterceptor, ALifycycle: string);
begin
  FBeanName := ABeanName;
  FLazyInit := ALazyInit;
  FScope := AScope;
  FInitMethod := AInitMethod;
  FInterceptor := AInterceptor;
  FLifycycle := ALifycycle;
end;

{ TPropertyAttribute }

constructor TPropertyAttribute.Create(AValue, ARefrence: string);
begin
  FValue := AValue;
  FRefrence := ARefrence;
end;

{ TConstructorArgAttribute }

constructor TConstructorArgAttribute.Create(AIndex: Integer; AValue, ARefrence: string);
begin
  FIndex := AIndex;
  FValue := AValue;
  FRefrence := ARefrence;
end;

end.
